import Vue from 'vue'
import VueRouter from 'vue-router'

//首页
// import index from 'pages/index/index'
/*页面路由*/
import index_r from 'pages/index/routes'
import login_r from 'pages/login/routes'
import user_r from 'pages/user/routes'
import password_r from 'pages/password/routes'
import apply_r from 'pages/apply/routes'

let routes = [
    { 
        path: '/', 
        name: '/',
        meta: {
            name: '首页'
        },
        component: () => import('pages/index/index.vue').then(e=>e.default)
    },
]

routes = routes.concat(
    index_r,
    login_r,
    user_r,
    password_r,
    apply_r,
    
)

//安装路由功能
Vue.use(VueRouter);
//创建 router 实例，然后传 `routes` 配置
export default new VueRouter({
    mode: 'history',
    routes // （缩写）相当于 routes: routes
});